projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66fa744
)
Fix bug in height filter pointed out by Valerio Messina. height corrections should...
author
tsteven4
<tsteven4@gmail.com>
Sun, 18 Dec 2016 23:38:00 +0000
(16:38 -0700)
committer
tsteven4
<tsteven4@gmail.com>
Sun, 18 Dec 2016 23:38:00 +0000
(16:38 -0700)
height.cc
patch
|
blob
|
history
diff --git
a/height.cc
b/height.cc
index f03e6e7abd67144e91ea9e5d43a8906b7a833962..963cae6814dab5b4bf3132ae28e98cd10a7bff67 100644
(file)
--- a/
height.cc
+++ b/
height.cc
@@
-109,12
+109,14
@@
correct_height(const Waypoint* wpt)
{
Waypoint* waypointp = (Waypoint*) wpt;
- if (addopt) {
- waypointp->altitude += addf;
- }
-
- if (wgs84tomslopt) {
- waypointp->altitude -= wgs84_separation(waypointp->latitude, waypointp->longitude);
+ if (waypointp->altitude != unknown_alt) {
+ if (addopt) {
+ waypointp->altitude += addf;
+ }
+
+ if (wgs84tomslopt) {
+ waypointp->altitude -= wgs84_separation(waypointp->latitude, waypointp->longitude);
+ }
}
}